Eclipse Platform
Pre-release 3.0

org.eclipse.ui.application
Interface IWorkbenchWindowConfigurer


public interface IWorkbenchWindowConfigurer

Interface providing special access for configuring workbench windows.

Window configurer objects are in 1-1 correspondence with the workbench windows they configure. Clients may use get/setData to associate arbitrary state with the window configurer object.

Note that these objects are only available to the main application (the plug-in that creates and owns the workbench).

This interface is not intended to be implemented by clients.

Since:
3.0
See Also:
IWorkbenchConfigurer#getWorkbenchWindowConfigurer, WorkbenchAdvisor.preWindowOpen(org.eclipse.ui.application.IWorkbenchWindowConfigurer)

Method Summary
 void addEditorAreaTransfer(Transfer tranfer)
          Adds the given drag and drop Transfer type to the ones supported for drag and drop on the editor area of this workbench window.
 void configureEditorAreaDropListener(DropTargetListener dropTargetListener)
          Configures the drop target listener for the editor area of this workbench window.
 IActionBarConfigurer getActionBarConfigurer()
          Returns the action bar configurer for this workbench window.
 Object getData(String key)
          Returns the data associated with this workbench window at the given key.
 boolean getShowCoolBar()
          Returns whether the underlying workbench window has a cool bar.
 boolean getShowMenuBar()
          Returns whether the underlying workbench window has a title bar.
 boolean getShowShortcutBar()
          Returns whether the underlying workbench window has a shortcut bar.
 boolean getShowStatusLine()
          Returns whether the underlying workbench window has a status line.
 boolean getShowTitleBar()
          Returns whether the underlying workbench window has a title bar.
 String getTitle()
          Returns the title of the underlying workbench window.
 IWorkbenchWindow getWindow()
          Returns the underlying workbench window.
 IWorkbenchConfigurer getWorkbenchConfigurer()
          Returns the workbench configurer.
 void setData(String key, Object data)
          Sets the data associated with this workbench window at the given key.
 void setShowCoolBar(boolean show)
          Sets whether the underlying workbench window has a cool bar.
 void setShowMenuBar(boolean show)
          Sets whether the underlying workbench window has a menu bar.
 void setShowShortcutBar(boolean show)
          Sets whether the underlying workbench window has a shortcut bar.
 void setShowStatusLine(boolean show)
          Sets whether the underlying workbench window has a status line.
 void setShowTitleBar(boolean show)
          Sets whether the underlying workbench window has a title bar.
 void setTitle(String title)
          Sets the title of the underlying workbench window.
 

Method Detail

getWindow

public IWorkbenchWindow getWindow()
Returns the underlying workbench window.

Returns:
the workbench window

getWorkbenchConfigurer

public IWorkbenchConfigurer getWorkbenchConfigurer()
Returns the workbench configurer.

Returns:
the workbench configurer

getActionBarConfigurer

public IActionBarConfigurer getActionBarConfigurer()
Returns the action bar configurer for this workbench window.

Returns:
the action bar configurer

getTitle

public String getTitle()
Returns the title of the underlying workbench window.

Returns:
the window title

setTitle

public void setTitle(String title)
Sets the title of the underlying workbench window.

Note that the window can have a title even if the window's title bar is not visible.

Parameters:
title - the window title
See Also:
#showTitleBar

getShowTitleBar

public boolean getShowTitleBar()
Returns whether the underlying workbench window has a title bar.

The initial value is controlled by the preference IWorkbenchPreferences.SHOULD_SHOW_TITLE_BAR

Returns:
true for a title bar, and false for no title bar

setShowTitleBar

public void setShowTitleBar(boolean show)
Sets whether the underlying workbench window has a title bar.

Parameters:
show - true for a title bar, and false for no title bar

getShowMenuBar

public boolean getShowMenuBar()
Returns whether the underlying workbench window has a title bar.

The initial value is controlled by the preference IWorkbenchPreferences.SHOULD_SHOW_MENU_BAR

Returns:
true for a title bar, and false for no title bar

setShowMenuBar

public void setShowMenuBar(boolean show)
Sets whether the underlying workbench window has a menu bar.

Parameters:
show - true for a menu bar, and false for no menu bar

getShowCoolBar

public boolean getShowCoolBar()
Returns whether the underlying workbench window has a cool bar.

The initial value is controlled by the preference SHOULD_SHOW_TOOL_BAR

Returns:
true for a cool bar, and false for no cool bar

setShowCoolBar

public void setShowCoolBar(boolean show)
Sets whether the underlying workbench window has a cool bar.

Parameters:
show - true for a cool bar, and false for no cool bar

getShowShortcutBar

public boolean getShowShortcutBar()
Returns whether the underlying workbench window has a shortcut bar.

The initial value is controlled by the preference SHOULD_SHOW_SHORTCUT_BAR

Returns:
true for a shortcut bar, and false for no shortcut bar

setShowShortcutBar

public void setShowShortcutBar(boolean show)
Sets whether the underlying workbench window has a shortcut bar.

Parameters:
show - true for a shortcut bar, and false for no shortcut bar

getShowStatusLine

public boolean getShowStatusLine()
Returns whether the underlying workbench window has a status line.

The initial value is controlled by the preference SHOULD_SHOW_STATUS_LINE

Returns:
true for a status line, and false for no status line

setShowStatusLine

public void setShowStatusLine(boolean show)
Sets whether the underlying workbench window has a status line.

Parameters:
show - true for a status line, and false for no status line

getData

public Object getData(String key)
Returns the data associated with this workbench window at the given key.

Parameters:
key - the key
Returns:
the data, or null if there is no data at the given key

setData

public void setData(String key,
                    Object data)
Sets the data associated with this workbench window at the given key.

Parameters:
key - the key
data - the data, or null to delete existing data

addEditorAreaTransfer

public void addEditorAreaTransfer(Transfer tranfer)
Adds the given drag and drop Transfer type to the ones supported for drag and drop on the editor area of this workbench window.

The workbench advisor would ordinarily call this method from the preWindowOpen callback. A newly-created workbench window supports no drag and drop transfer types. Adding EditorInputTransfer.getInstance() enables IEditorInputs to be transferred.

Note that drag and drop to the editor area requires adding one or more transfer types (using addEditorAreaTransfer) and configuring a drop target listener (with configureEditorAreaDropListener) capable of handling any of those transfer types.

See Also:
configureEditorAreaDropListener(org.eclipse.swt.dnd.DropTargetListener), EditorInputTransfer

configureEditorAreaDropListener

public void configureEditorAreaDropListener(DropTargetListener dropTargetListener)
Configures the drop target listener for the editor area of this workbench window.

The workbench advisor ordinarily calls this method from the preWindowOpen callback. A newly-created workbench window has no configured drop target listener for its editor area.

Note that drag and drop to the editor area requires adding one or more transfer types (using addEditorAreaTransfer) and configuring a drop target listener (with configureEditorAreaDropListener) capable of handling any of those transfer types.

Parameters:
dropTargetListener - the drop target listener that will handle requests to drop an object on to the editor area of this window
See Also:
addEditorAreaTransfer(org.eclipse.swt.dnd.Transfer)

Eclipse Platform
Pre-release 3.0

Copyright (c) IBM Corp. and others 2000, 2003. All Rights Reserved.